home *** CD-ROM | disk | FTP | other *** search
/ Executor 2.0 / executorv2.0.iso / pc / dos / extra / library / demoware / asymptot.hqx / Asymptote 1.1 Demo / Demo < prev    next >
Encoding:
Text File  |  1994-11-01  |  1.5 KB  |  52 lines

  1. % A demonstration script for Asymptote
  2.  
  3. % ¥ To run the demo:
  4. %   - Select "Run Recorder" 
  5. %        from the Script menu.
  6.  
  7. % ¥ To experiment with Asymptote more:
  8. %   - Select "New Recorder" from the
  9. %        File>Recorder menu.
  10. %   - Select "Clear" from the Graph menu
  11.  
  12. % ¥ For a brief guide to creating graphs
  13. %   with Asymptote, please read the 
  14. %   "Getting Started" chapter contained 
  15. %   in this demo.
  16.  
  17. if undefined demoNumber then set demoNumber 1     $
  18.     else if demoNumber 14 >= then set demoNumber 1 $
  19.     else set demoNumber demoNumber 1 +
  20.  
  21. % Ask which demo to run
  22. set demoNumber ?Welcome to Asymptote                                                $
  23. Which demo (1 through 14) would you like to see?
  24.  
  25. if demoNumber 1 < demoNumber 14 > + then stop
  26.  
  27. % Run the demo script (\demoNumber inserts the number into the script name)
  28. Demo\demoNumber
  29.  
  30. % Close that script now that we are done with it
  31. close Demo\demoNumber
  32.  
  33. graphunits cm            % Display the graph cursor information in centimeters
  34. cursor                    % Activate the graph cursor
  35.  
  36. set response true
  37. ask response Yes No Are you really done viewing this demo?
  38. if response false = then cursor
  39. graphunits inches        % Switch back to inches (the demo scripts were written for inches)
  40.  
  41. set PrintIt false                % Make false the default choice
  42. ask PrintIt Yes No Do you want to print the graph?
  43. if PrintIt then print        % Print the graph if PrintIt is true
  44.  
  45. fullscreen no
  46.  
  47. set response true
  48. ask response OK " " ?To try a different demo select Run Recorder from the Script menu.
  49.  
  50. % Clear out the vectors
  51. rpn 0 >y >x >e >p
  52. npts 0